Network Control - Thaliana

control measures for the Arabidobis Thaliana Boolean Model


In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline

In [2]:
from __future__ import division
import numpy as np
from itertools import product
from cana.control import fvs, mds, sc
from cana.datasets.bio import THALIANA
from IPython.display import display
from IPython.core.display import HTML

In [3]:
N = THALIANA()

Discovering Driver Nodes / Control Nodes


In [6]:
display(HTML('<h3>Control State Transition Graph (CSTG)</h3>'))
# THIS MIGHT TAKE A LONG TIME, it is here for demo purposes.
driver_nodes = N.attractor_driver_nodes(min_dvs=1, max_dvs=6, verbose=True)
print(N.get_node_name(driver_nodes))
#> ['AP2', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS'], ['AG', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS']


Control State Transition Graph (CSTG)

Trying with 1 Driver Nodes
Trying with 2 Driver Nodes
Trying with 3 Driver Nodes
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-6-43ad18330151> in <module>()
      1 display(HTML('<h3>Control State Transition Graph (CSTG)</h3>'))
      2 # THIS MIGHT TAKE A LONG TIME, it is here for demo purposes.
----> 3 driver_nodes = N.attractor_driver_nodes(min_dvs=1, max_dvs=6, verbose=True)
      4 print(N.get_node_name(driver_nodes))
      5 #> ['AP2', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS'], ['AG', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS']

~/Documents/GitHub/CANA/cana/boolean_network.py in attractor_driver_nodes(self, min_dvs, max_dvs, verbose)
    579                         for dvs in itertools.combinations(nodeids, nr_dvs):
    580                                 dvs = list(dvs)
--> 581                                 cstg = self.controlled_state_transition_graph(dvs)
    582                                 cag = self.controlled_attractor_graph(cstg)
    583                                 att_reachable_from = self.mean_reachable_attractors(cag)

~/Documents/GitHub/CANA/cana/boolean_network.py in controlled_state_transition_graph(self, driver_nodes)
    635 
    636                                 for constate in controlled_states:
--> 637                                         cstg.add_edge(statenum, self.bin2num(constate))
    638 
    639                 return cstg

/anaconda3/lib/python3.6/site-packages/networkx/classes/digraph.py in add_edge(self, u_of_edge, v_of_edge, **attr)
    566                 pass  # silent failure on remove
    567 
--> 568     def add_edge(self, u_of_edge, v_of_edge, **attr):
    569         """Add an edge between u and v.
    570 

KeyboardInterrupt: 

In [7]:
display(HTML('<h3>Structural Controlability (SC)</h3>'))
SC = N.structural_controllability_driver_nodes(keep_self_loops=False)
print(N.get_node_name(SC))


Structural Controlability (SC)

[['UFO', 'LUG', 'CLF', 'SEP'], ['UFO', 'EMF1', 'LUG', 'CLF']]

In [9]:
display(HTML('<h3>Minimum Dominating Set (MDS)</h3>'))
MDS = N.minimum_dominating_set_driver_nodes(max_search=10)
print(N.get_node_name(MDS))


Minimum Dominating Set (MDS)

[['UFO', 'EMF1', 'LUG', 'CLF', 'TFL1', 'SEP']]

In [11]:
display(HTML('<h3>Feedback Vertex Control (FVS)</h3>'))
FVS_g = N.feedback_vertex_set_driver_nodes(graph='structural', method='grasp', remove_constants=True)
print(N.get_node_name(FVS_g) , '(grasp)')
FVS_bf = N.feedback_vertex_set_driver_nodes(graph='structural', method='bruteforce', remove_constants=True)
print(N.get_node_name(FVS_bf) , '(bruteforce)')


Feedback Vertex Control (FVS)

[['AP3', 'UFO', 'LFY', 'WUS', 'AG', 'TFL1', 'PI']] (grasp)
[['AP3', 'UFO', 'LFY', 'WUS', 'AG', 'TFL1', 'PI']] (bruteforce)

In [7]:
#display(HTML('<h3>Pinning Control (PC)</h3>'))
#under development

Differences between the Control Methods


In [12]:
# Control via State Transition Graph (CSTG)
CSTGs = [['AP2', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS'],
         ['AG', 'EMF1', 'LFY', 'TFL1', 'UFO', 'WUS']
        ]

# Pinning Control
PCs = [['AP3', 'UFO', 'AP1', 'LFY', 'WUS', 'AG'],
       ['AP3', 'UFO', 'EMF1', 'WUS', 'AG', 'TFL1'],
       ['AP3', 'UFO', 'LFY', 'WUS', 'AG', 'TFL1']
      ]

# Feedback Vertex Control
# (threshold,loops,[control sets])
FVS_Objs = [
    ('original',49, [['AP3','UFO','LFY','WUS','AG','TFL1','PI']]),
    ('0',19, [['AP3','UFO','AP1','LFY','WUS' 'AG','PI'],['AP3','UFO','EMF1','WUS','AG','TFL1','PI'],['AP3','UFO','LFY','WUS','AG','TFL1','PI']]),
    ('0.0078125',17,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS', 'PI']]),
    ('0.0234375',14,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS', 'PI'],['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1', 'PI'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1', 'PI']]),
    ('0.03125',14,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS', 'PI'],['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1', 'PI'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1', 'PI']]),
    ('0.046875',14,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS', 'PI'],['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1', 'PI'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1', 'PI']]),
    ('0.09375',13,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS'],['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.125',10,[['AP3', 'UFO', 'AP1', 'LFY', 'WUS'],['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1'],['AP3', 'UFO', 'LFY', 'WUS', 'AG'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.140625',8,[['UFO', 'AP1', 'LFY', 'WUS'],['UFO', 'EMF1', 'WUS', 'TFL1'],['UFO', 'LFY', 'WUS', 'AG'],['UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.25',3,[['UFO', 'EMF1', 'WUS', 'TFL1'],['UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.2734375',3,[['UFO', 'EMF1', 'WUS', 'TFL1'],['UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.28125',3,[['UFO', 'EMF1', 'WUS', 'TFL1'],['UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.34375',3,[['UFO', 'EMF1', 'WUS', 'TFL1'],['UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.453125',3,[['AP3', 'UFO', 'EMF1', 'WUS', 'TFL1'],['AP3', 'UFO', 'LFY', 'WUS', 'TFL1']]),
    ('0.5',2,[['AP3', 'UFO', 'FUL', 'LFY', 'WUS', 'TFL1']]),
    ('0.65625',2,[['AP3', 'UFO', 'FUL', 'LFY', 'WUS', 'TFL1', 'PI']]),
    ('0.7265625',2,[['AP3', 'UFO', 'FUL', 'LFY', 'WUS', 'AG', 'TFL1', 'PI']]),
    ('0.75',1,[['AP3', 'UFO', 'FUL', 'LFY', 'WUS', 'AG', 'TFL1', 'PI']]),
    ('0.875',1,[['AP3', 'UFO', 'FUL', 'AP1', 'LFY', 'WUS', 'AG', 'TFL1', 'PI']])
    ]

# Sort sets by alphabetical order
CSTGs = [sorted(x) for x in CSTGs]
PCs = [sorted(x) for x in PCs]
FVS_Objs = [(name,loops,[sorted(x) for x in sets]) for (name,loops,sets) in FVS_Objs]

In [13]:
def jaccard(u,v):
    return len(u.intersection(v)) / len(u.union(v))

In [14]:
display(HTML("<h2>PC vs FVS</h2>"))
for FVS_O in FVS_Objs:
    print('T: %s' % (FVS_O[0]))
    for PC, FVS in product(PCs,FVS_O[2]):
        FVSset, PCset = set(FVS), set(PC)
        FVSstr, PCstr = ','.join(FVS), ','.join(PC)
        inclusion = PCset.issubset(FVSset)
        print('PC in FVS=%i ; J=%.3f [%s <-> %s]' % (inclusion, jaccard(PCset,FVSset) , PCstr , FVSstr))
    print


PC vs FVS

T: original
PC in FVS=0 ; J=0.625 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.625 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=1 ; J=0.857 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
T: 0
PC in FVS=0 ; J=0.500 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUSAG]
PC in FVS=0 ; J=0.444 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.625 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.200 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUSAG]
PC in FVS=1 ; J=0.857 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.625 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUSAG]
PC in FVS=0 ; J=0.625 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=1 ; J=0.857 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.0078125
PC in FVS=0 ; J=0.714 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
T: 0.0234375
PC in FVS=0 ; J=0.714 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.03125
PC in FVS=0 ; J=0.714 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.046875
PC in FVS=0 ; J=0.714 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.333 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.09375
PC in FVS=0 ; J=0.833 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.375 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.375 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.125
PC in FVS=0 ; J=0.833 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.375 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.375 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.140625
PC in FVS=0 ; J=0.667 [AG,AP1,AP3,LFY,UFO,WUS <-> AP1,LFY,UFO,WUS]
PC in FVS=0 ; J=0.250 [AG,AP1,AP3,LFY,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,LFY,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP1,AP3,LFY,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.250 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP1,LFY,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,EMF1,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,LFY,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP1,LFY,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,LFY,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.25
PC in FVS=0 ; J=0.250 [AG,AP1,AP3,LFY,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP1,AP3,LFY,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,EMF1,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.2734375
PC in FVS=0 ; J=0.250 [AG,AP1,AP3,LFY,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP1,AP3,LFY,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,EMF1,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.28125
PC in FVS=0 ; J=0.250 [AG,AP1,AP3,LFY,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP1,AP3,LFY,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,EMF1,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.34375
PC in FVS=0 ; J=0.250 [AG,AP1,AP3,LFY,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP1,AP3,LFY,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,EMF1,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,EMF1,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.429 [AG,AP3,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.453125
PC in FVS=0 ; J=0.375 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.571 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.833 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.5
PC in FVS=0 ; J=0.500 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,FUL,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,FUL,LFY,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.714 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,TFL1,UFO,WUS]
T: 0.65625
PC in FVS=0 ; J=0.444 [AG,AP1,AP3,LFY,UFO,WUS <-> AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.444 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.625 [AG,AP3,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.7265625
PC in FVS=0 ; J=0.556 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.556 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=1 ; J=0.750 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.75
PC in FVS=0 ; J=0.556 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.556 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=1 ; J=0.750 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.875
PC in FVS=1 ; J=0.667 [AG,AP1,AP3,LFY,UFO,WUS <-> AG,AP1,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=0 ; J=0.500 [AG,AP3,EMF1,TFL1,UFO,WUS <-> AG,AP1,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
PC in FVS=1 ; J=0.667 [AG,AP3,LFY,TFL1,UFO,WUS <-> AG,AP1,AP3,FUL,LFY,PI,TFL1,UFO,WUS]

In [16]:
display(HTML("<h2>CSTG vs FVS</h2>"))
for FVS_O in FVS_Objs:
    print('T: %s' % (FVS_O[0]))
    for CSTG, FVS in product(CSTGs,FVS_O[2]):
        FVSset, CSTGset = set(FVS), set(CSTG)
        FVSstr, CSTGstr = ','.join(FVS), ','.join(CSTG)
        inclusion = CSTGset.issubset(FVSset)
        print('CSTG in FVS=%i ; J=%.3f [%s <-> %s]' % (inclusion, jaccard(CSTGset,FVSset) , CSTGstr , FVSstr))
    print


CSTG vs FVS

T: original
CSTG in FVS=0 ; J=0.444 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.625 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
T: 0
CSTG in FVS=0 ; J=0.200 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUSAG]
CSTG in FVS=0 ; J=0.444 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.444 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.200 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUSAG]
CSTG in FVS=0 ; J=0.625 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.625 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.0078125
CSTG in FVS=0 ; J=0.333 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.333 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
T: 0.0234375
CSTG in FVS=0 ; J=0.333 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.333 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.03125
CSTG in FVS=0 ; J=0.333 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.333 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.046875
CSTG in FVS=0 ; J=0.333 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.333 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,PI,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,PI,TFL1,UFO,WUS]
T: 0.09375
CSTG in FVS=0 ; J=0.375 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.375 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.125
CSTG in FVS=0 ; J=0.375 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.375 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.375 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.140625
CSTG in FVS=0 ; J=0.429 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP1,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.429 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.429 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP1,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,LFY,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.25
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.2734375
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.28125
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.34375
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.667 [AG,EMF1,LFY,TFL1,UFO,WUS <-> LFY,TFL1,UFO,WUS]
T: 0.453125
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,EMF1,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.571 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,LFY,TFL1,UFO,WUS]
T: 0.5
CSTG in FVS=0 ; J=0.500 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,TFL1,UFO,WUS]
T: 0.65625
CSTG in FVS=0 ; J=0.444 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.444 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.7265625
CSTG in FVS=0 ; J=0.400 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.556 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.75
CSTG in FVS=0 ; J=0.400 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.556 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
T: 0.875
CSTG in FVS=0 ; J=0.364 [AP2,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP1,AP3,FUL,LFY,PI,TFL1,UFO,WUS]
CSTG in FVS=0 ; J=0.500 [AG,EMF1,LFY,TFL1,UFO,WUS <-> AG,AP1,AP3,FUL,LFY,PI,TFL1,UFO,WUS]

In [ ]: